package com.lyun.controller;

import com.lyun.common.BaseContext;
import com.lyun.service.HuanXinService;
import com.lyun.vo.HuanXinUserVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/huanxin")
public class huanXinController {

    @Resource
    private HuanXinService huanXinService;

    /**
     * 查询环信的账号和密码
     */
    @GetMapping("/user")
    public HuanXinUserVo user() {
        Long currentId = BaseContext.getCurrentId();
        return huanXinService.findHuanXinUser(currentId);
    }
}
